<title>电灯</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width">
<link rel="icon" href="favicon1.ico" />
<img id="pic" src ="pic_bulboff.gif" />
<button onclick="kaiGaun()"> 开关 </button>
<script>
  var i=1
  function kaiGaun(){
	if(i==1){
	   pic.src="pic_bulbon.gif";
	   i=0;
}	else{
	   pic.src="pic_bulboff.gif";
	   i=1;
}

}
</script>